#!/bin/bash
echo "安装依赖..."
echo "请输入sudo 密码"
sudo -v
if ! command -v node &> /dev/null
then
    echo "Node.js 未安装，请先安装 Node.js"
    # 退出脚本
    exit 1
else
    echo "Node.js 已安装"
fi
if ! command -v npm &> /dev/null
then
    echo "npm 未安装，请安装 npm"
    exit 1
else
    echo "npm 已安装"
fi
sudo apt update
sudo apt install -y dpkg fakeroot build-essential
if [ $? -eq 0 ]; then
    echo "依赖安装成功"
else
    echo "依赖安装失败"
fi
echo "依赖安装完成"

